package cn.zhl.设计模式.工厂.impl.factorymethod;

import cn.zhl.设计模式.工厂.BasicPizza;
import cn.zhl.设计模式.工厂.impl.BJCheesePizza;
import cn.zhl.设计模式.工厂.impl.BJPepperPizza;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2021-03-05 19:49
 **/
public class BJOrderPizza implements OrderPizza{
	@Override
	public BasicPizza create(String typeName) {
		BasicPizza bp = null;
		switch (typeName){
			case "cheese":
				bp = new BJCheesePizza();
				break;
			case "pepper":
				bp = new BJPepperPizza();
				break;
		}
		return bp;
	}
}
